<?php
    use yii\widgets\ActiveForm;
    use yii\helpers\Html;
    $this->title = '站点管理';
?>
<h1><?= Html::encode($this->title)?></h1>
<div class="row">
    <div class="col-xs-12">
        <form method="post" action="<?= \yii\helpers\Url::to(['site/update'])?>" class="form-horizontal">
            <div class="form-group">
                <label class="col-sm-2 control-label text-left">站点标题</label>
                <div class="col-sm-2">
                    <input type="text" name="option[site_title]" value="<?php if(isset($data['site_title'])):?><?= Html::encode($data['site_title'])?><?php endif;?>" class="form-control">
                    <p class="help-block"></p>
                </div>
            </div>
            <input name="_csrf" type="hidden" id="_csrf" value="<?= Yii::$app->request->csrfToken ?>">
            <div class="form-group">
                <label class="col-sm-2 control-label text-left">站点开关</label>
                <div class="col-sm-8">
                    <label>
                        <input type="radio" name="option[is_open]" class="flat-red" value="1" <?php if(isset($data['is_open']) && $data['is_open'] == 1):?>checked<?php endif;?>>开
                    </label>
                    <label>
                        <input type="radio" name="option[is_open]" class="flat-red" value="0" <?php if(isset($data['is_open']) && $data['is_open'] == 0):?>checked<?php endif;?>>关
                    </label>
                    <p class="help-block"></p>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label text-left"></label>
                <div class="col-sm-10">
                    <button type="submit" class="btn btn-primary">保存更改</button>
                </div>
            </div>
        </form>
    </div>
</div>